import random
num=random.randint(a=0,b=100)
i=0
flag=True
while flag:
    guess_num=int(input("请输入你要猜的数字:"))
    if guess_num==num:
       print("猜中了")
       flag=False
    else:
         if guess_num>num:
            print("猜大了")
         else:
            print("猜小了")
    i+=1
print("你猜了:",i)